Version 2.5
User's Guide

Example ScenariosPrevious | Next
Contents

HTTP Sentry Example
Configuring a HTTP Sentry with Notifier

This example will demonstrate how to monitor a typical Web server, and receive an alphanumeric page whenever the server fails.

Defining the Sentry

First, you need to select a specific page to verify. In general, it is best to select a page or file that is not very long, to minimize any potential performance penalty. Testing a typical HTML page of a few K Bytes should have virtually no performance impact, so make sure you do not choose a page or file that is exceedingly large and performance should never be an issue.

Another consideration in choosing a page to monitor is how the page is generated. The simplest test of a Web server is to access a normal HTML page, stored on the server's file system, which is served without the intervention of CGI applications or add-on processes. However, to verify that a particular CGI is functioning properly, you may want to select a URL that causes a page to be generated by the CGI. Database applications, "Server Side Include" handlers, text search and retrieval engines, and other processes performed by add-ons can be verified simply by using the appropriate URL.

Once you have selected the page to test, use a standard Web browser to open the corresponding URL. This will not only verify that the URL is correct, but will make it easy to select a "Verify Phrase" for the page. Use the "View Source..." option in your browser to view the HTML source of the document, and pick out a phrase that occurs in the page. Choose a phrase that is unique to the page, so that incorrect error messages or other content-related problems can be identified by PageSentry. The phrase can be a few characters or a few words, and it is generally best to pick something that is unique but not too long.

Next, launch PageSentry and open a new HTTP Sentry (using the "Add Sentry..." option of the "Setup" menu). Enter a name for your Sentry, keeping in mind that this is the name that will be displayed in the Status Window and should allow you to easily recognize the Sentry in logs and error reports. Next, enter the name of the log file into which PageSentry will save a record of it's activity. If you do not need a log for the Sentry tests, simply leave this field blank. Also, select a frequency interval that you would like the Sentry to perform its test. There are several factors that you may want to consider in setting the test frequency. See the Montoring Strategies section of this guide for more details. For now, set the frequency to "5 Minutes". You can always change this later if you feel that you need to increase or decrease this time.

"HTTP (Web)" is chosen by default from the Sentry Type pull-down menu, so leave the Sentry Type setting as it is. In the "Check URL" field, enter the full URL of the page you wish to check, usually in the form "http://www.yourcom.com/page.html". The URL should be entered exactly as it was entered into the browser earlier. Next, enter the verify phrase you chose above in the "Verify Phrase" field.

If user validation is required to access the page, enter the correct username and password. Again, the username and password should be entered exactly as they were in the validation dialog box displayed by the Web browser when you accessed the page. For pages that are not password protected, simply leave these fields blank.

Defining the Notifier

To receive an alphanumeric page when the Web server fails, you will be defining a PageNow! Notifier for this Sentry. Leaving the Sentry window open, select "Add Notifier..." from the "Setup" menu. Enter a name for the new Notifier, again remembering to choose a name that will be easily recognizable. Next, click the "Send 'Back Up' Notices" checkbox, which will cause the Notifier to send a second page as soon as the server has returned to service after failures. If you want the Sentry to repeatedly send failure notices for as long as the server is down, click the "Persistent Notices" box.

This type of Sentry requires that you have PageNow! running on the same machine as PageSentry. For more information on PageNow!, visit the MarkSpace Web site at http://www.markspace.com/. Also, you must put either the PageNow! application, or an alias to it, in the same folder as PageSentry.

Open PageNow! and configure a "Subscriber", as detailed in the PageNow! documentation. The specific configuration settings do not matter, but be sure to select a subscriber name that is easy to remember and recognize. Send a couple of test messages directly from PageNow! to verify that your configuration is correct and that messages can be sent and received correctly.

Back in PageSentry, select "PageNow!" from the Notifier Type pull-down, and enter the Subscriber Name as it has been configured in the PageNow! application.

Next, click the "Message" button. Here, you can enter the text you would like to receive on the pager when the server reports an error. Use normal text and the defined "tokens" to configure the page you receive to fit your pager or preference.

To test the Notifier, click the "Run it" button. You may see PageNow! processing the message in the background, and then hear the modem connect to your provider and send the message. When the page arrives, check it to see if you would like to make any changes to your configuration. When finished, click "OK" to close and save the Notifier. Next, return to the Edit Sentry dialog box and you will see the new Notifier in the "Defined Notifiers" list. Select this Notifier and click "Add" so that the pager Notifier will be used to send messages when the Sentry detects a failure.

Testing the Sentry

Click on "Execute Test" in the Edit Sentry dialog box. This will cause your Sentry to check the Web server page for the verify phrase you entered. If the test passes, you have correctly configured your Sentry. Click "OK" to close and save the Sentry, and notice that the Sentry has been added to the Sentry list in the Status Window.


AppleShare Sentry Example
Configuring an AppleShare Sentry with prioritized Notifiers
This example will demonstrate how to monitor an AppleShare File server. When the server fails, an e-mail message will be sent, followed by an automatic restart should the server not return to service within a set time period.

Defining the Sentry

To test AppleShare servers, PageSentry will log on to the server (if necessary), save a file, wait 2 seconds, read and verify the file, and then delete it. This process will require that PageSentry have full read/write/delete access to the server being tested. The first task in creating an AppleShare Sentry, then, is to either create an account on your AppleShare server for PageSentry to use, or to verify that an existing user account can be used (probably your own).

Next, you must determine the determine the directory you will use on the file server to conduct the test. This is the folder in which PageSentry will create the temporary file. Mount the file server, and choose a folder in which the test can be performed. It is best to select a folder which is not purged on a regular basis, or in which other users might interfere with the Sentry's test. Also, it is best not to select a folder that is commonly left open on user desktops, since the periodic creation of a temporary file might be confusing.

Launch PageSentry and open a new Sentry (by using the "Setup" menu to select "Add Sentry..."). Enter a name for your Sentry, choosing a name that will be easy to recognize on the Status Window, in log entries, etc. Also, enter a log file name, if the AppleShare Sentry's activities need to be tracked. As with all Sentry types, select a frequency interval that you would like the Sentry to perform its test. Keep in mind that you are using CPU resources on both the PageSentry machine and the AppleShare server, and that the AppleShare test involves slightly more overhead than most other Sentries. For now, set a frequency period of 5 minutes.

Select "AppleShare" from the Sentry Type pull-down menu. This will cause the "Test Setup" fields below to change to those applicable for an AppleShare test. Enter the correct username and password that will be used to log on to the AppleShare server. Remember that it is extremely imporatant that the username and password PageSentry uses to access the server permit full read/write/delete access.

Now, click on "Set Volume/Folder", and use the "Standard File Dialog" to select the AppleShare volume and folder that you wish to use for the Sentry. Again, selecting the correct volume to test the server in question is essential, but choosing a specific folder is entirely up to you.

Defining the Notifiers

When the AppleShare server fails, the first action this Sentry will take is to send an E-mail notification. Leaving the Sentry window open, select "Add Notifier..." from the Setup menu and begin by entering a name for the new Notifier that will be easy to recognize. In this example, it will be important for a follow up e-mail message to be sent when the server is back up (since it may be automatically restarted without your intervention), so click on the "Send 'Back Up' Notices" checkbox.

Enter your e-mail address and SMTP server name under "User Address" and "Mail Server", respectively. If you are not sure of the name of your mail server, check your e-mail package configuration. The mail server name is often, but not always, the second part of your e-mail address, which follows the '@' (at sign) symbol.

You also need to specify where you would like the warning message to come from. Specifying a good "Mail From" address allows you to do two things. First, you can use the From address as an easy to recognize "flag" that the mail message is coming from PageSentry. For example, a From address of "PAGESENTRY@yourorg.com" will make PageSentry warnings easy to spot in your mailbox. The other important use for the From address is to ensure that the mail message is received. If your mail account or server has failed for some reason, then mail servers will return the mail with an error to the sender. This allows you to enter a friend or co-worker's e-mail address and have the mail message "bounce" to them if for some reason the message can not be delivered to you.

After filling out the e-mail addresses and the server name, click on the "Message" button. Enter appropriate text for both the message body as well as the "Subject" for the message you will receive. Use "tokens" to represent pieces of information detailing the specific problem being reported. When you are done entering the message, click "OK".

To test the Notifier, click the "Run it" button, then open your standard mail package and check your incoming mail. When the e-mail message arrives, check it to see if you would like to make any changes to your configuration. Back in PageSentry, click "OK" to close and save the Notifier.

When the Sentry detects a server failure, you will be sent an e-mail message immediately, but there will be times when you simply can not get to the server or you are not at your desk to receive the e-mail warning. In these cases, you can tell PageSentry to wait 20 minutes and restart the server even if you are not there to do it manually. To do this, you will be using a PowerKey Pro intelligent power strip.

The first step in configuring PageSentry to control the PowerKey Pro is to install and set up the PowerKey Pro hardware and software. Remember that the Powerkey Pro ADB (Apple Desktop Bus) adapter must be plugged into the ADB connector of the PageSentry machine, and the PowerKey software must be installed on the PageSentry machine as well. The server(s) that will be tested and restarted are then plugged into the outlets of the PowerKey Pro.

Follow the instructions given in the PowerKey User's Guide for installation. We strongly recommend that you test your PowerKey using a lamp or some other standard electrical device. For example, plug a lamp into outlet 1 of your PowerKey Pro power strip and verify that you can turn it on and off from within the PowerKey Editor software.

Once the PowerKey Pro is installed and functioning, you can configure a new Notifier in PageSentry. Select "Add Notifier..." from the Setup menu to create another Notifier. Enter a name for the new Notifier, again selecting an easy to recognize name like "Restart Server 1". It is best not to select "Persistent Notices" for a PowerKey Notifier, as the server may take longer to restart than the PageSentry tests allow. In this case, "Persistent Notices" would cause the server to be repeatedly restarted, causing a never-ending reboot cycle.

Next, use the "Delay After Initial Failure" to make PageSentry wait before restarting the server. Set the delay to "20" and choose "Minutes" from the pop-up menu provided. When the server fails, PageSentry will send the e-mail message immediately using the Notifier we defined earlier. When the 20 minute delay completes without the server returning to service, the restart Notifier we are creating now will take action.

In the "Notification" section, choose "PowerKey Pro" as the "Notifier Type", and then select the outlet number that the server to be restarted is plugged into. If you are not sure of the outlet number, look at the PowerKey unit itself. The outlet numbers are labeled, making it easy to see which server is plugged into which outlet. If you have more than 1 PowerKey unit plugged into the PageSentry machine, enter the name of the unit that the server is plugged into. PowerKey units are named in the PowerKey Editor software, so if you can not rememeber the unit name(s), open the PowerKey Editor and check. If you have only 1 PowerKey unit, you can simply leave the PowerKey Unit name blank.

To test the Notifier, click the "Run it" button. Again, you may want to test the Notifier with a lamp or another simple electric appliance, rather than a real server. When finished, a dialog will tell you that the test is complete, so click "OK". Note that PageSentry will report errors communicating with the PowerKey software, but if PageSentry successfully sends the events that control the PowerKey, no errors will be reported. If PageSentry reports that no errors occurred, but the unit doesn't shut off, wait, and turn back on, then see the PowerKey software and documentation for troubleshooting information.

When the Notifier is functioning correctly, click the "OK" button to close and save the Notifier.

If the AppleShare Sentry window has been closed for some reason, re-open it by double-clicking it's name in the Sentry list of the Status Window. In the Sentry Edit window, notice that both the e-mail and PowerKey Notifiers now appear in the "Defined Notifiers" list. Select one of the Notifiers and click "Add", then select the other and click "Add" again. This will cause the AppleShare Sentry to run both notifiers, at the appropriate times.


TCP Stream Sentry Example
Uses of the TCP Stream Sentry, and notification via e-mail to multiple recipients.
You can configure the TCP Stream Sentry to monitor a variety of servers, including news (NNTP), POP mail, and others. This example will demonstrate how to monitor a news server and send warning messages to an on-duty network administrator, plus send a delayed warning to the network manager.

Using the TCP Stream Sentry to Monitor a News Server

Launch PageSentry and open a new TCP Stream Sentry (by selecting "Add Sentry..." from the "Setup" menu). Enter a name for your Sentry, as always choosing an easy to recognize name for use in the Status Window and in failure notifications. Next, if you would like the Sentry's activity logged, enter the log file name. Also, select a frequency interval that you would like the Sentry to perform its test. You can always change this later if you feel that you need to increase or decrease this time.

Now, select "TCP Stream" from the Sentry Type pull-down menu. Enter the server address or domain name that you wish to check, which is usually in the form "news.yourcom.com". Since different TCP/IP servers work on different ports, the default port for the stream Sentry will almost certainly be incorrect. Check the configuration or documentation of the server you would like to test to find out what port the server is running on. To test a news server, enter "119", which is the default NNTP port.

Click "Execute Test" to try your Sentry. If your Sentry test succeeds, you will see a value filled in for the Checksum field. PageSentry will use this value to verify subsequent tests, insuring the server is working properly. If PageSentry is ever unable to open a connection with the server, or if the checksum is found to be incorrect, PageSentry will recognize the server failure. This effectively tests any TCP/IP server that responds to incoming connections with a stream of data.

Some common services and port numbers:

Finger79
Kerberos88
POP3110
News (NNTP)119
Network Time (NTP)123
SNMP161

Defining the Notifiers

In this example, PageSentry will send e-mail to multiple people at different times. The notifiers could just as easily send pages, restart the server, or trigger AppleScript applications.

First, configure three Notifiers, which will send e-mail to Bob, Mary, and Chris. Bob and Mary, in this example, are first line network administrators, and Chris is the network manager. Bob is on call Monday through Friday, 6 a.m. to 6 p.m., and all day Saturday. Mary is on call 6 p.m. to 6 a.m. during the week and on Sunday. Chris should receive an e-mail message any time of the day or day of the week, but only if the server is down for more than 30 minutes.

The basic configuration of the Notifiers to send mail to Bob and Mary are very similar, the only difference being their e-mail addresses. However, the schedules are also different, set by clicking and dragging through the appropriate areas on the schedule section at the bottom of the Notifier window. Red (highlighted) areas represent times in which each administrator is on duty, as the Notifier for Bob, shown below, demonstrates.


Figure 23: A Scheduled Notifier.

Mary's Notifier will have a different name and e-mail address, and the schedule will be exactly opposite the one shown for Bob. When both Notifiers are added to the Stream Sentry, only one will trigger, depending on the time of day and day of week. This will make sure that whoever is on call at the time the server fails will be the one to receive the warning e-mail.

Note that if a server initially fails at, say 5:50 a.m., Mary will receive a warning e-mail message immediately. If the server does not return to service by 6:00 a.m., Bob will also receive a warning e-mail. Any failure, even if it isn't the initial failure, will trigger a Notifier when it occurs during the Notifier's scheduled period.

To complete the example, another Notifier can be created for Chris. In this case (as will the Notifiers in the previous examples), the entire schedule will be left highlighted (red). Chris' Notifier will also be set with a "Delay After Initial Failure" of 30 minutes.

Back on the Stream Sentry Editor window, be sure to add all 3 Notifiers to the "Notifiers to Execute" list. This will ensure that either Bob or Mary receives an immediate notice of the failed news server, and will send Chris a warning if Bob or Mary is unable to correct the problem in a timely manner.


Copyright © 1995-98 Maxum Development Corporation
820 South Bartlett Road - Suite 104
Streamwood, IL 60107
http://www.maxum.com/

Rev. 2/18/98

Previous | Next
Contents